<template>
  <div class="category">
    <page-seach
      pageName="category"
      :conFig="formConfig"
      @resetBtnClick="headelResetClick"
      @queryClick="headelQueryClick"
    ></page-seach>
    <page-content
      pageName="category"
      :pageContentConfig="pageContentConfig"
      ref="pageContentRef"
      @visibleClick="isVisibleClick"
      @pageUpdateClick="updateClick"
      contentTitle="新建商品"
    >
    </page-content>
    <page-model
      ref="pageModelRef"
      :modelConfig="modelConfig"
      :defaultInfo="defaultInfo"
      pageName="category"
    ></page-model>
  </div>
</template>

<script lang="ts">
import { defineComponent } from 'vue'
import { pageContent } from '../../../../components/page-content/index'
import { pageSeach } from '../../../../components/page-seach/index'
import pageModel from '../../../../components/page-model/pageModel.vue'
import { formConfig } from './search-config'
import { pageContentConfig } from './page-content-config'
import { modelConfig } from './model-config'
import { usePageModel } from '../../../../hooks/page-model'
import { userPageSeach } from '../../../../hooks/user-page-seach'
export default defineComponent({
  name: 'category',
  components: {
    pageContent,
    pageSeach,
    pageModel
  },
  setup() {
    const [pageContentRef, headelResetClick, headelQueryClick] = userPageSeach()
    const [pageModelRef, isVisibleClick, updateClick, defaultInfo] =
      usePageModel()
    return {
      pageContentConfig,
      formConfig,
      modelConfig,
      usePageModel,
      pageModelRef,
      pageContentRef,
      isVisibleClick,
      headelResetClick,
      headelQueryClick,
      updateClick,
      defaultInfo
    }
  }
})
</script>

<style scoped></style>
